package com.chenchen.subject.application.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * ClassName TestConsumer
 * description:
 * 测试消费
 * @author 海问香
 * @createTime 2024/9/4 9:21
 *
 */
@Component
@RocketMQMessageListener(topic = "first-topic", consumerGroup = "test-consumer")
@Slf4j
public class TestConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
      log.info("收到消息:{}", s);
    }
}
